<!--
 * @Author: xfworld
 * @Date: 2020-06-03 14:49:36
 * @LastEditors: xfworld
 * @LastEditTime: 2020-06-11 09:53:02
 * @Description: 
-->

<template>
  <div>
    <GridMenu :menuItem="menuItemList"></GridMenu>
    <div style="height: 2rem;"></div>
    <span v-html="userData"></span>
    <div style="height: 2rem;"></div>
    <span v-html="scanData"></span>
    <!-- <Loading></Loading> -->
  </div>
</template>

<script>
//import Loading from "@/components/main/loading";
import GridMenu from "@/components/main/gridMenu";
import {mapGetters} from "vuex";
export default {
  name: "more",
  components: {
    //Loading,
    GridMenu
  },
  computed: {
    ...mapGetters("scanner", ["pdaUseEnable", "pdaScanData"])
  },
  watch: {
    pdaScanData: {
      handler(data) {
        this.registerCallBack(data);
      },
      immediate: true
    }
  },
  data() {
    return {
      userData: "",
      scanData: "",
      menuItemList: {
        num: "2",
        children: [
          {
            icon: "ecard-pay",
            text: "入库扫描",
            access: "",
            uri: "goods",
            events: 100
          },
          {
            icon: "certificate",
            text: "出库扫描",
            uri: "about"
          },
          {
            icon: "certificate",
            text: "分拣扫描"
          }
        ]
      }
    };
  },
  methods: {
    registerCallBack(data) {
      if (data !== null && data !== undefined) {
        this.scanData = data;
      }
    }
  }
};
</script>
